// 加载mockjs库
import Mock from 'mockjs'
Mock.mock('/api/data', /post|get/, function () {
    let allPoints = [
        [
            [198.803297722629, 0.241448749515217],
            [270.676724085853, 0.450060022892613],
        ],
        [
            [98.803297722629, 0.341448749515217],
            [70.676724085853, 1.20060022892613],
        ],
        [
            [118.803297722629, 0.141448749515217],
            [70.676724085853, 0.850060022892613],
        ],
        [
            [298.803297722629, 0.41448749515217],
            [170.676724085853, 0.50060022892613],
        ],
        [
            [280.3297722629, 0.1448749515217],
            [170.676724085853, 0.60022892613],
        ],
        [
            [203.297722629, 0.48749515217],
            [167.6724085853, 0.22892613],
        ],
        [
            [203.297722629, 0.48749515217],
            [167.6724085853, 0.22892613],
        ],
        [
            [198.803297722629, 0.241448749515217],
            [270.676724085853, 0.450060022892613],
        ],
        [
            [98.803297722629, 0.341448749515217],
            [70.676724085853, 1.20060022892613],
        ],
        [
            [118.803297722629, 0.141448749515217],
            [70.676724085853, 0.850060022892613],
        ],
        [
            [298.803297722629, 0.41448749515217],
            [170.676724085853, 0.50060022892613],
        ],
        [
            [280.3297722629, 0.1448749515217],
            [170.676724085853, 0.60022892613],
        ],
        [
            [203.297722629, 0.48749515217],
            [167.6724085853, 0.22892613],
        ],
        [
            [203.297722629, 0.48749515217],
            [167.6724085853, 0.22892613],
        ],
        [
            [198.803297722629, 0.241448749515217],
            [270.676724085853, 0.450060022892613],
        ],
        [
            [98.803297722629, 0.341448749515217],
            [70.676724085853, 1.20060022892613],
        ],
        [
            [118.803297722629, 0.141448749515217],
            [70.676724085853, 0.850060022892613],
        ],
        [
            [298.803297722629, 0.41448749515217],
            [170.676724085853, 0.50060022892613],
        ],
        [
            [280.3297722629, 0.1448749515217],
            [170.676724085853, 0.60022892613],
        ],
        [
            [203.297722629, 0.48749515217],
            [167.6724085853, 0.22892613],
        ],
        [
            [203.297722629, 0.48749515217],
            [167.6724085853, 0.22892613],
        ],
        [
            [198.803297722629, 0.241448749515217],
            [270.676724085853, 0.450060022892613],
        ],
        [
            [98.803297722629, 0.341448749515217],
            [70.676724085853, 1.20060022892613],
        ],
        [
            [118.803297722629, 0.141448749515217],
            [70.676724085853, 0.850060022892613],
        ],
        [
            [298.803297722629, 0.41448749515217],
            [170.676724085853, 0.50060022892613],
        ],
        [
            [280.3297722629, 0.1448749515217],
            [170.676724085853, 0.60022892613],
        ],
        [
            [203.297722629, 0.48749515217],
            [167.6724085853, 0.22892613],
        ],
        [
            [203.297722629, 0.48749515217],
            [167.6724085853, 0.22892613],
        ]
    ]
    let allErrs = [
        2, 2.5, 1.5, 3, 4, 5, 2, 2, 2.5, 1.5, 3, 4, 5, 2, 2, 2.5, 1.5, 3, 4, 5, 2, 2, 2.5, 1.5, 3, 4, 5, 2
    ]
    let maxErr = Math.max(...allErrs)
    let result = {
        allPoints: allPoints,
        allErrs: allErrs,
        maxErr: maxErr
    }
    return result

})

Mock.mock('/api/StaticData', /post|get/, function () {
    let result = [
        {
            'stuId': 1,
            'dataId': 1,
            'name': '管笑',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 2,
            'dataId': 1,
            'name': '江聪',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 2,
            'dataId': 2,
            'name': '江聪',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 2,
            'dataId': 3,
            'name': '江聪',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 2,
            'dataId': 4,
            'name': '江聪',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 3,
            'dataId': 1,
            'name': '王文超',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 3,
            'dataId': 2,
            'name': '王文超',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 3,
            'dataId': 3,
            'name': '王文超',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 3,
            'dataId': 4,
            'name': '王文超',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 3,
            'dataId': 5,
            'name': '王文超',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 3,
            'dataId': 6,
            'name': '王文超',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 4,
            'dataId': 1,
            'name': '吴郑轩',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 5,
            'dataId': 1,
            'name': '向翔宇',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 1,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 2,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 3,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 4,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 5,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 6,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 7,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 8,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 9,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 10,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
        {
            'stuId': 6,
            'dataId': 11,
            'name': '许陈长立',
            'group': '学员',
            'time': '2020.9.10',
            'horizontalScore': 90,
            'verticalScore': 78
        },
    ]
    return result
})